package com.rfid.util;

import com.rfid.db.bean.Book;
import com.rfid.manager.DBManager;

import java.util.Random;

public class Mock {

    public static void setMockDataToDb() {
        Book book = new Book();
        book.setName("测试");
        book.setAuthor("张三");
        book.setBarcode("abcderf" + System.currentTimeMillis());
        book.setPreBorrowReader("李四");
        book.setBoxNum(2);
        DBManager.insertBook(book);

        book = new Book();
        book.setName("测试");
        book.setAuthor("张三");
        book.setBarcode("123abc" + System.currentTimeMillis());
        book.setBoxNum(3);
        DBManager.insertBook(book);

        book = new Book();
        book.setName("测试");
        book.setAuthor("张三");
        book.setBarcode("ffffssss" + System.currentTimeMillis());
        book.setBoxNum(22);
        DBManager.insertBook(book);
    }
}
